package constants

const (
	// DefaultXtrabackupImage default xtrabackup image
	DefaultXtrabackupImage = "10.10.15.51/xtrabackup:1.0"
	// DefaultExporterImage mysqld-exporter image
	DefaultExporterImage = "10.10.15.51/mysqld-exporter:v0.11.0"
	// DefaultMysqldumpImage default mysqldump image
	DefaultMysqldumpImage = "10.10.15.51/maridb-backup:v0.0.1"
	// DefaultMariaDBConfigMap  default mariadb reference configmap name
	DefaultMariaDBConfigMap = "mariadb"
	// DefaultMariaDBRootPassword  default mariadb root passworad
	DefaultMariaDBRootPassword = "root"
	// DefaultStorageClass default storageClass name
	DefaultStorageClass = "standard"
	// DefaultDataName default storageClass name
	DefaultDataName = "mariadb-data"
	// DefaultClusterSecretName include mysql password and user and database info
	DefaultClusterSecretName = "mariadb-secret"

	// ClusterCRDResourceKind is the Kind of a Cluster.
	ClusterCRDResourceKind = "MariaDBCluster"
	// BackupCRDResourceKind is the Kind of a Backup.
	BackupCRDResourceKind = "Backup"
	// RestoreCRDResourceKind is the Kind of a Restore.
	RestoreCRDResourceKind = "Restore"
	// BackupScheduleCRDResourceKind is the Kind of a BackupSchedule.
	BackupScheduleCRDResourceKind = "BackupSchedule"

	// ClusterLabel is applied to all components of a mariadb cluster
	ClusterLabel = "v1alpha1.finupgroup.com/mariadbcluster"
	// MariaDBLabel label of all resource
	MariaDBLabel = "mariadb"
	// MariaDBHeadLessService headless serivce of statefulset
	MariaDBHeadLessService = "mariadb"
	// MariaDBHeadService read serivce of statefulset
	MariaDBHeadService = "mariadb-read"

	// MariaDBReadOnlyService read-only of statefulset
	MariaDBReadOnlyService = "mariadb"
	// MariaDBContainerName mariadb conatainer n·ame
	MariaDBContainerName = "mariadb"
	// MariaDBContainerPortName mariadb conatainer port name
	MariaDBContainerPortName = "mariadb"
	// MariaDBContainerPort mariadb conatainer port
	MariaDBContainerPort = 3306

	// MariaDBExporterContainerName exporter conatainer name
	MariaDBExporterContainerName = "exporter"
	// MariaDBExporterContainerPortName exporter conatainer port name
	MariaDBExporterContainerPortName = "exporter"
	// MariaDBExporterContainerPort exporter conatainer port
	MariaDBExporterContainerPort = 9104

	// MariaDBXtrabackupContainerName xtrabackup conatainer name
	MariaDBXtrabackupContainerName = "xtrabackup"
	// MariaDBXtrabackupContainerPortName xtrabackup conatainer port name
	MariaDBXtrabackupContainerPortName = "xtrabackup"
	// MariaDBXtrabackupContainerPort xtrabackup conatainer port
	MariaDBXtrabackupContainerPort = 3307

	// MariaDBInitsContainerInit mariadb inits container of init-mariadb
	MariaDBInitsContainerInit = "init-mariadb"
	// MariaDBInitsContainerClone mariadb inits container of clone-mariadb
	MariaDBInitsContainerClone = "clone-mariadb"
	// ReferenceMariaDBClusterKey in cord to find the mariadb cluster which reference the configmap
	ReferenceMariaDBClusterKey = "reference-maridb-cluster"

	// RestartPolicyKey  the key of annotations of restart policy
	RestartPolicyKey = "restartPolicy"
	// RestartCountKey  the mariadb cluster restart count
	RestartCountKey = "restartCount"
	// OrderRestartPolicy the policy will delete the mariadb statefulset's pod in order
	OrderRestartPolicy = "OrderedReady"
	// ParallelRestartPolicy the policy will delete the mariadb statefulset's pod in parallel
	ParallelRestartPolicy = "Parallel"

	// BackupCMDMysqlDump mysqldump cmd
	BackupCMDMysqlDump = "mysqldump"
	// BackupCMDXtrabackup xtrabackup cmd
	BackupCMDXtrabackup = "xtrabackup"
	// BackupAllDatabases backup all databases
	BackupAllDatabases = "*"
	// BackupFileName backup data file name
	BackupFileName = "/tmp/backup.sql.gz"

	// S3Region s3 Region env
	S3Region = "S3_REGION"
	// S3Endpoint s3 Endpoint env.
	S3Endpoint = "S3_ENDPOINT"
	// S3Bucket s3 Bucket env
	S3Bucket = "S3_BUCKET"
	// S3ForcePathStyle s3 ForcePathStyle env
	S3ForcePathStyle = "S3_FORCEPATHSTYLE"
	// S3CredentialsSecret s3 CredentialsSecret env
	S3CredentialsSecret = "S3_CREDENTIALSSECRET"
	// SecreteNamespace secret namespace env
	SecreteNamespace = "SECRETE_NAMESPACE"
	// MariDBClusterName mariadb custer name
	MariDBClusterName = "CLUSTER_NAME"

	// ReplicationUser cluster replication user
	ReplicationUser = "replication"
	// ReplicationPassword cluster replication user password
	ReplicationPassword = "cmVwbGljYXRpb24="

	// BackupTaskQueueName backup mq queue name
	BackupTaskQueueName = "backup"

	// RestoreTaskQueueName backup mq queue name
	RestoreTaskQueueName = "restore"

	// SecretRootPasswordKey root password key of secret
	SecretRootPasswordKey = "database-root-password"
	// SecretPasswordKey mysql-password key of secret
	SecretPasswordKey = "database-password"
	// SecretUserKey mysql-user key of secret
	SecretUserKey = "database-user"
	// SecretDatabaseNameKey mysql init database name
	SecretDatabaseNameKey = "database-name"
)
